<template>
  <div id="top-list">
    <div class="search-list">
      <span class="account">账号</span>
      <span>代售</span>
    </div>
    <div class="container">
      <form action="" class="parent">
        <input type="text" />
        <i class="el-icon-search"></i>
        <input type="button" value="搜账号" />
      </form>
    </div>
  </div>
</template>

<script>
export default {
  name: "TopList",
};
</script>

<style scoped>
#top-list {
  padding: 0px 200px;
}
.search-list {
  display: flex;
  width: 120px;
  padding-top: 40px;
  margin-left: 100px;
}
.search-list > span {
  flex: 1;
  width: 50px;
  height: 50px;
  text-align: center;
  line-height: 50px;
}
.account {
  background-color: #59e01a;
  border-radius: 8px;
  color: #1e2022;
}
.container {
  height: 50px;

  /* margin: 100px auto; */
}

.parent {
  width: 100%;
  height: 42px;
  top: -4px;
  position: relative;
}

.parent > input:first-of-type {
  /*输入框高度设置为40px, border占据2px，总高度为42px*/
  width: 545px;
  height: 40px;
  border: 1px solid rgb(250, 76, 29);
  font-size: 16px;
  outline: none;
  border-radius: 5px;
  position: absolute;
  left: 101px;
}

.parent > input:first-of-type:focus {
  border: 1px solid rgb(250, 76, 29);
  padding-left: 10px;
}

.parent > input:last-of-type {
  /*button按钮border并不占据外围大小，设置高度42px*/
  width: 110px;
  height: 40px;
  background: rgb(250, 76, 29);
  border: 1px solid rgb(250, 76, 29);
  color: #fff;
  font-size: 16px;
  outline: none;
  border-radius: 0px 10px 10px 0px;
  position: absolute;
  right: 57px;
  padding-left: 10px;
}
.el-icon-search {
  position: absolute;
  right: 135px;
  top: 12px;
  z-index: 9;
  color: #fff;
}
</style>